function res = max_norm(ref_u,u,x_max)
num = size(u,2);
h = x_max/(num-1);
ref_num = size(ref_u,2);
ref_h = x_max/(ref_num-1);
tmp = interp1(0:ref_h:x_max,ref_u,0:h:x_max,'PCHIP');
res = err(u,tmp,-1,x_max);
